I think the thinking is that a woman's hair is like a natural crown given her. But since a crown would also symbolize authority and women are supposed to be in subjection it wouldn't be fitting for them to be wearing a crown while praying or prophesying because then the crown would imply that they have equal or superior authority to any men around (because women have longer hair). So to avoid shaming the man by having a bigger crown than him while doing a manly role in his presence, the woman has to cover her crown - cover her hair. If she would not cover the crown - her hair - then she should shave it off.
My personal speculation is that the idea that long hair represents authority could have come about by these ancient chauvinists observing that male lions have longer head hair and male chickens - roosters - have a bigger head thingy than the female hens. These observations of larger head pieces in these male animals may have caused them to associate bigger head pieces with authority since they tended to occur in male animal species. But when they noticed it in human females they decided to spin it as being merely a crown of beauty instead of a crown of authority because God wouldn't give women a crown of authority. But just to be on the safe side the women have to cover the head piece if doing a male role so that their crown of beauty can never be misinterpreted as a crown of authority.